package demo.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

/**
 * @author Creared by wangyang on 2019-01-10 15:34
 * email:techyang.wangy.@ymm56.com
 */
@Aspect
@Component
public class HelloProxy {

    @Around(value = "execution(public * Hello.sayHello())")
    public Object around(ProceedingJoinPoint pjp) throws Throwable {
        System.out.println("---------around--------");
        return pjp.proceed();
    }
}
